<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>css3实现烟花特效</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        html{
            width: 100%;
            height: 100%;
        }
        body{
            width: 100%;
            height: 100%;
            /*display: -webkit-flex;*/
        }
        .box{
        	width: 300px;
        	height: 200pxs;
        	position: fixed;
        	top: 50%;
        	left: 50%;
        	margin-left: -150px;
        	margin-top: -100px;
        	transform: scale(0);
        	animation: box 2s 5s ;
        }
        @keyframes box{
        	0%{
        		transform: scale(0);
        	}
        	80%{
        		transform: scale(1);
        	}
        	100%{
        		transform: scale(1);
        	}
        }
        .box h1{
        	font-size: 100px;
        	color: transparent;
        	text-align: center;
        	background: url(imgs/kk.jpg);
        	-webkit-background-clip: text;
        	animation: back 1s infinite linear;
        }
        .box p{
        	font-size: 50px;
        	color: transparent;
        	text-align: center;
        	background: url(imgs/kk.jpg);
        	-webkit-background-clip: text;
        	animation: back 3s infinite linear;
        }
        @keyframes back{
        	0%{
        		background-position: 0;
        	}
        	100%{
        		background-position: -304px;
        	}
        }
        #container{
            width: 25%;
            height: 100%;
            background-color: black;
            float: left;
            position: relative;
        }
        #fireworks{
            position: absolute;
            left: 50%;
            margin-left: -250px;
            bottom: 60%;
            margin-bottom: -180px;
            transform: scale(0);
            animation: fireworks 5s 3s ;
        }

        @keyframes fireworks {
            0%{
                transform: scale(0);
            }
            80%{
                transform: scale(1);
            }
            100%{
                opacity: 0;
            }
        }
        #firecracker{
            position: absolute;
            left: 50%;
            bottom: 0%;
            margin-left: -4px;
            animation: firecracker 3s forwards;
        }

        @keyframes firecracker {
            0%{
                transform: scale(1);
                bottom: 0%;
            }
            100%{
                bottom: 60%;
                transform: scale(0);
            }
        }
    </style>
</head>
<body>
<div id="container">
    <div id="fireworks"><img src="imgs/fireworks.png" alt=""></div>
    <div id="firecracker"><img src="imgs/firecracker.png" alt="" width="8px"></div>
</div>
<div id="container">
    <div id="fireworks"><img src="imgs/fireworks.png" alt=""></div>
    <div id="firecracker"><img src="imgs/firecracker.png" alt="" width="6px"></div>
</div><div id="container">
    <div id="fireworks"><img src="imgs/fireworks.png" alt=""></div>
    <div id="firecracker"><img src="imgs/firecracker.png" alt="" width="8px"></div>
</div><div id="container">
    <div id="fireworks"><img src="imgs/fireworks.png" alt=""></div>
    <div id="firecracker"><img src="imgs/firecracker.png" alt="" width="8px"></div>
</div>
<div class="box">
	<h1>祝大家</h1>
	<p>中秋节快乐</p>
</div>
</body>
</html>